home *** CD-ROM | disk | FTP | other *** search
- Path: minerva.ibernet.es!usenet
- From: cmahoney@readysoft.es (Colin Mahoney)
- Newsgroups: comp.lang.c++
- Subject: Re: Q: implementing streambuf::underflow() method
- Date: Mon, 26 Feb 1996 21:44:48 GMT
- Organization: Servicio IBERNET (Telefonica Transmision de Datos)
- Message-ID: <31318fb6.3582660@news.ibernet.es>
- References: <4gij8m$pi7@news.xs4all.nl>
- NNTP-Posting-Host: readysoft_203.readysoft.es
- X-Newsreader: Forte Agent .99d/32.182
-
- Ronald Werring <ronaldw@xs4all.nl> wrote:
-
- >I want to make a subclass of the streambuf class to
- >implement a different buffering strategy for an istream.
- >I use Visual-C++ (1.5 and 4.0).
- >
- >My question: "When is underflow() called? Only when
- > the buffer is empty or for every character?"
- >
-
- underflow should be called only when the buffer is empty. To find out
- if this is indeed what happens, set a breakpoint on 'return *gptr()' (
- after moving it to a new line, of course - one reason not to have
- multiple statements on the same line ), and one on one of the
- following lines. Then let it run and see for yourself.
-
-
- [...]
- ---------------------------------------
- Colin Mahoney ( cmahoney@readysoft.es )
- Sabadell, Spain
- ---------------------------------------
-